using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using DevExpress.Data.Filtering;

namespace ChuanPlus.Reports
{
    public partial class DeliveryOrder : DevExpress.XtraReports.UI.XtraReport
    {
        private int recordCount;
        public DeliveryOrder()
        {
            InitializeComponent();
        }

        private void PageFooter_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {


        }

        private void DeliveryOrder_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            xpColOrder.Criteria = new BinaryOperator("OrderID", paramOrderID.Value.ToString());
            foreach (Order item in xpColOrder)
            {
                DAO.OrderDAO.CalculateSubTotal(item);
            }
            recordCount = 0;
        }

        private void lblRecordNum_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            lblRecordNum.Text = (++recordCount).ToString();
        }

    }
}
